package com.association.management.service;

import com.association.management.mbg.model.Admin;
import com.association.management.mbg.model.Association;
import com.association.management.mbg.model.Department;
import com.association.management.mbg.model.User;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by PanD
 * 2020/6/22 15:25
 */


public interface AdminService {

// 组织信息相关 ---------------------------------------------------------------
    /**
     * description: 创建组织/社团
     */
    Association addAssociation(Association association, Integer userId);

    /**
     * description: 移除组织
     */
    int deleteAssociation(Integer associationId);

    /**
     * description: 更新组织/社团信息
     */ //TODO 组织 -》 部门 和 等级
    Association updateAssociation(Association association);

    /**
     * description: 获取当前用户管理的社团
     */
    List<Association> getAllAssociation(User user);

// 部门相关 ---------------------------------------------------------------

    /**
     * description: 添加单个部门
     */
    Department addDepartment(Department department, Integer associaionId);

    /**
     * description: 更新部门信息
     */
    Department updateDepartment(Department department, Integer associationId);

    /**
     * description: 删出部门信息
     */
    int deleteDepartment(Integer departmentId, Integer associationId);

    /**
     * description: 获取当前社团的所有部门
     */
    List<Department> getAllDepartmentByAssociationId(Integer associationId);

// 用户/权限管理相关 ---------------------------------------------------------------

    /**
     * description: 添加普通管理员
     */
    Admin addAdmin(Admin admin, Integer associationId);

    /**
     * description: 移除管理员
     */
    int deleteAdmin(Integer adminId);

    /**
     * description: 获取当前社团的所有管理员
     */
    List<Admin> getAllAdmin(Admin admin);
}
